#pragma once
#include<deque>

namespace bai
{
	template<class T,class Container=deque<T>>
	class Queue
	{
	public:
		
		
		void push(const T&x)
		{
			_q.push_back(x);
		}
		
		void pop()
		{
			_q.pop_front();
		}

		T& front()
		{
			return _q.front();
		}

		

		T& back()
		{
			return _q.back();
		}

		

		int size()const
		{

			return _q.size();
		}

		bool empty()const
		{
			return _q.empty();
		}



	private:
		Container _q;
	};


	void test_queue()
	{
		Queue<int,list<int>> q;
		q.push(1);
		q.push(2);
		q.push(3);
		q.push(4);
		while (!q.empty())
		{
			cout << q.front() << " ";
			q.pop();
		}

	}
}